#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int count_one_bite(unsigned int n)
{
	int count = 0;
	while (n)
	{
		if (n % 2 == 1)
			count++;
		n /= 2;
	}
	return count;
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	int count = count_one_bite(n);
	printf("%d", count);
	return 0;
}